Method and apparatus for user-selected event reminders

ABSTRACT

An electronic calendar includes such features as recurring reminders, dividing unpredictable work loads into equal pieces, template free parsing, a reminders scheduling algorithm to reduce spikes, dynamic delivery and recovery algorithms, methods for splitting the work load between controllers and workers and for monitoring progress, all within the context of a calendar architecture for a large enterprise.

CROSS-REFERENCE TO RELATED APPLICATIONS

The present application is a continuation of U.S. application Ser. No.13/951,353 filed Jul. 25, 2013, which is a continuation of Ser. No.13/267,818 filed Oct. 6, 2011, which is a divisional of U.S. applicationSer. No. 12/030,796 filed on Feb. 13, 2008 which is now issued as U.S.Pat. No. 8,108,436, which is a divisional of Ser. No. 10/484,176 filedon Jun. 21, 2004 which is now issued as U.S. Pat. No. 7,334,000, whichis a 371 national stage application of international application numberPCT/US01/26409 filed on Aug. 22, 2001, which claims the benefit of andpriority to U.S. provisional application No. 60/305,722, filed Jul. 16,2001. Each of the aforementioned patent(s), and application(s) arehereby incorporated by reference in their entirety.

BACKGROUND OF THE INVENTION

The invention relates to the setting and triggering of reminders. Moreparticularly, the invention relates to a method and apparatus forcalendaring reminders.

DESCRIPTION OF THE PRIOR ART

Various Calendaring and associated reminder systems are known.

See, for example:

-   M. Huemoeller, J. Arvada, W. Huemoeller, Personal Activity    Scheduling Apparatus, U.S. Pat. No. 5,855,006 (Dec. 29, 1998) (The    personal activity scheduling system accesses data from various    sources to provide the user with information that is required to    enable the user to conveniently and expeditiously schedule    activities without requiring access to other sources of information.    The personal activity scheduling system can include schedules of    various sports activities, cultural events, birthdays and    anniversaries, professional meetings and deadlines, and any other    temporally based items of interest to the particular individual.    Each of these temporally based activities can be associated with    data representative of information required by the user to schedule    an activity from the list of potential activities into the    individuals personal calendar as well as make reservations and    ticket purchases using this system.);-   S. Chapin, Jr., Computerized Prompting Systems, U.S. Pat. No.    5,931,878 (Aug. 3, 1999) (A computerized prompting system is    especially useful for vehicular maintenance and includes a Level of    maintenance database with task schedules for selected vehicles and    prompt frequencies for those tasks. A prompter initiates a display    informing the user that a scheduled maintenance is due to be    performed on a selected date and an Internet exchange connects the    database to a service center. The system has a capability to print    coupons and to receive and incorporate updates from manufacturers.);    and-   R. Rasansky, L. Denton, III, B, Cynwyd, R. Morris, Scheduling System    For Use Between Users On The Web, U.S. Pat. No. 5,960,406 (Sep.    28, 1999) (A computer system for scheduling events between end users    of the system. Each end user is granted a unique password protected    personal calendar. This calendar is generated from information    stored in a database at a central server, and delivered to each end    user as standard HTML sent through the Internet. This custom    personal calendar is then viewed by the end user in a standard Web    Browser. This obviates the need for special software programs to be    purchased by end users, and also allows end users of any CPU type to    read their calendars. When an end user uses the system to send an    Invitation or Announcement to others on the system, the sending end    user has the option of sending Email in addition to posting that    information in the calendars' of others. When an end user sends an    Invitation or Announcement to a person who is not an Appointment    user, then the Appointment system automatically creates a unique    calendar for the recipient, and sends an Email to that person.    Individuals who use the present system can post reminders to    themselves, send announcements to people they know, and make    appointments with people they know. When these messages are sent,    the communications is nearly instantaneous because the system makes    one record and allows both (or many) parties to view it.).

While such systems as are known are useful, they are not specificallyadapted for use in large enterprises where the scheduling and executionof such events as reminders must be balanced against system capacity andbandwidth for several types of events having various levels of urgency.

It would be advantageous to provide an electronic calendar that includessuch features as recurring reminders, the ability to divideunpredictable workloads into equal pieces, a templatized contentmanagement system that uses pre-parsing for efficiency, a schedulingalgorithm that reduces transient spikes in delivery volume, dynamicdelivery and recovery algorithms, methods for splitting and coordinatingthe delivery workload across several computers, all within the contextof a calendar architecture for supporting a large enterprise.

SUMMARY OF THE INVENTION

The presently preferred embodiment of the invention provides anelectronic calendar that includes such features as recurring reminders,dividing unpredictable work loads into equal pieces, templatepre-parsing, a reminders scheduling algorithm to reduce spikes, dynamicdelivery and recovery algorithms, and methods for splitting the workload between controllers and workers and for monitoring progress, allwithin the context of a calendar architecture for supporting a largeenterprise, such as AmericaOnLine (AOL) of Dulles, Va.

One aspect of the invention provides optimized recurring remindersdatabase queries.

Two standard methods of handling recurring reminders are:

1. Expand the recurrence and store the reminders as single occurrencereminders; and

2. Read all recurring reminders and see which ones occur during aparticular time span.

Method 1 above occurs when a reminder is entered into a database andmethod 2 occurs when reminders are retrieved from the database.

Method 1 has two at least major drawbacks:

-   -   Any changes require large amounts of database activity; and    -   How far into the future to expand the recurrence is unknown.

Method 2 has at least one major drawback:

-   -   Reading every recurring reminder is a very database intensive        task.

One aspect of the invention provides a third method of handlingrecurring reminders:

3. Store a probability hint with each recurring reminder.

The hint is used to optimize the number of recurring reminders that mustbe accessed to find all reminders to be sent during a time period. Thehint, in conjunction with the time period, greatly reduces the number offalse hits against the database. The hint heuristic is specific to eachrecurrence type, e.g. weekly, monthly, etc. During the queuing processeach recurring reminder has a hint attached.

Another aspect of the invention provides a method for dividing anunpredictable workload into equal pieces.

This aspect of the invention applies to a service, such as the AOLReminders service, where clients can request actions to be taken inspecific time frames, but nothing is known in advance about the detailsof such actions. Mechanisms are provided whereby clients may specifythese details, such as user ID and time of reminder, when requesting anaction, but it is not known whether, for example, some user IDs appearmuch more frequently than others.

When the entire workload of such a service is large enough to requirethe use of several devices working in parallel, it is important todivide up the actions that must be taken during a given time frame intogroups of equal size and to distribute these groups in parallel across aset of devices, so that the number of actions to be taken by each devicedoes not exceed the device's throughput capacity within such time frame.But the details specified by the clients may not furnish the basis forany such equal division. This division is achieved by attaching a labelto the description of each action, in addition to all details specifiedby the client and independent therefrom, at the time when the requestfor action is received from the client, in such a fashion that allpossible labels appear with equal frequency. Actions to be taken in agiven time frame can then be grouped according the labels attached tothem, and it is assured that these groups are of equal size.

Another aspect of the invention comprises a reminders service thatdelivers messages that are composed of two parts, i.e. standard remindercontent such as branding and message formatting, and event-specificcontent such as the title of the event, the user's notes about theevent, etc. To meet performance goals, the reminders service mustminimize the amount of per-reminder work it performs, and must performas much of the work as possible local to the machine, i.e. with littleor no inter-process, disk, network, or database interaction on aper-reminder basis.

One of the key performance optimizations provided by the inventionoccurs with regard to the way standard reminder content is handled. Allstandard content for reminders is stored in a set of template files. Thetemplate file specifies the standard content for the reminder, andincludes a set of directives within the template indicating where thesubstitution of event-specific content should occur. At runtime,template files are loaded into a cache in a lazy fashion, i.e. when theyare first needed.

When the template is first loaded into memory, it is pre-parsed, or‘freeze-dried.’ This involves dissecting the template into an array ofhard coded string constants and variable names. The process ofassembling the final reminder content is therefore reduced to walkingthe freeze-dried array once. String constants are appended to the finalmessage content, and template variable names are used as a lookup intothe dictionary of key-value pairs of event data for this particularreminder. This approach radically reduces the amount of CPU timerequired to assemble the final message content.

The invention also comprises a reminders scheduling algorithm forreducing spikes in delivery volume. One inherent difficulty indelivering reminders to millions of users is that the distribution ofthe reminder delivery times is extremely uneven, e.g. meetings, socialactivity, events of all types generally start on the hour or on thehalf-hour, while few users set reminders for 8:07 am. This isexacerbated by the fact that users are generally most active during asubset of each 24-hour period—business hours on Monday-Friday, forinstance, or (worse yet) lunchtime, e.g. 11-2 pm. The user base isdistributed across several time zones, and this does help to scatter thetraffic somewhat, but with only a three hour spread across the U.S. theimprovement is only marginal—9 am Monday morning PST is Noon EST—bothextremely busy times for users of the reminders service. This clusteringof user activity creates hotspots in the delivery schedule, i.e. timeswhere the number of reminders to be delivered momentarily exceeds thethroughput of the system.

To ensure robust and predictable reminder delivery, the remindersservice must spread the load of reminder delivery across time as evenlyas possible without delivering reminders too late or too early. Thereminders service weighs several factors in deciding when to schedule areminder for delivery. Fundamental to the approach are two things:

-   -   The intent of the user; and    -   The destination device.

The intent of the user is inferred by examining the lead time of thereminder. Lead time is defined as the difference between the time anevent occurs and the time for which the reminder for that event occurs.For instance, an event at 9:00 am with a reminder at 8:45 am has a leadtime of 15 minutes; an event on September 12^(th) with a reminder onSeptember 5^(th) has a lead time of one week.

A key assumption made by the reminders service is that the longer thelead time for the reminder, the less accuracy is required in itsdelivery. To illustrate with the examples above, the reminder with alead time of minutes has likely been set by a user to remind themselvesto take immediate action upon receipt of the reminder—to attend a 9:00am meeting, for instance. By contrast, a reminder with the lead time ofone week suggests that the user must take some action in the near term(preparing for a meeting that is one week away, for instance), but thedelivery accuracy of reminder with the one week lead time is much lesscritical. Delivering the 15-minute lead time reminder an hour early isbad—the user set the reminder with the assumption that they would bereminded of the event just when they need to act upon it. Late deliveryis worse—the user may miss their meeting. For the one week lead timereminder, though, delivering the reminder an hour in advance isacceptable—the general intent of the user to receive a reminder about aweek before the event.

This approach is implemented in the reminders service by assigning eachreminder to a priority class based on the lead time of the reminder.Reminders with a lead time of less than one hour all fall into onepriority class, for instance, and reminders with a lead time of over oneweek fall into another. In the presently preferred embodiment of theinvention, there are four priority classes in all. Each priority classhas a delivery window during which the reminders of that class may bedelivered. The size of the window varies according to the urgency of thepriority class, and it is measured backwards from the ideal deliverytime.

The delivery window for reminders with a lead time of less than one houris ten minutes, which can be read as follows:

For a reminder with an ideal delivery time of 8:45 am that has a leadtime of 15 minutes, i.e. it is a reminder for an event at 9 am, theacceptable delivery window is from 8:35 am-8:45 am. The delivery windowis allowed to be much larger for reminders with long lead times—for areminder with an ideal delivery time of 9:00 am September 5^(th) thathas a lead time of one week, the acceptable delivery window is from 6:00am-9:00 am September 5^(th).

Clustering reminders into different priority classes allows the serviceto smooth the spikes in reminder delivery. During a peak time such as9:00 am PST the majority of reminders for 9:00 am will have beendelivered in the hours previous, with extremely long lead time remindersbeing delivered several hours earlier. Short lead time reminders arestill delivered close to 9:00 am, because the user intent with shortlead times is to be reminded in an accurate manner close to the actualevent time.

This delivery algorithm is further complicated by the notion that notall delivery destinations are ideal for less-accurate delivery.

The service supports delivery to email and cellular telephonedestinations. If a user creates an email reminder with a one week leadtime for 6:00 am Monday morning, it is quite acceptable to deliver theemail reminder to the user's mailbox at 3:00 am. This is completelyuntrue for cellular telephone reminders—messaging to a cellulartelephone at 3:00 am is likely to be unwanted by the user. For thisreason, the size of the delivery window is drawn from a matrix ofpriority class and lead time. Reminders to email destinations aredelivered much less accurately as their lead time increases, whiledelivery to pagers and cellular telephones maintains a short deliverywindow even for long lead time reminders, because the nature of thedevice requires more accurate delivery.

The invention also comprises a reminders dynamic delivery/recoveryalgorithm. Once a reminder has been scheduled using the algorithmdescribed above, it is a candidate for delivery. The term ‘candidate’ isused to indicate that the actual delivery may not start as soon as thereminder has been scheduled for delivery.

Instead, a dynamic prioritization scheme is used to determine which ofthe candidate reminders to deliver. It is assumed that at certain timesthe number of reminders to be delivered exceed the delivery capacity ofthe system. This may occur at peak system usage times as discussedabove, and may also occur after a scheduled or unscheduled systemoutage, when there is a large backlog of undelivered reminders that mustbe processed. At these times the system must choose to deliver somereminders while others are forced to wait until capacity becomesavailable. This choice is accomplished with a dynamic priority queue.

As mentioned above, reminders with similar delivery properties, e.g.same priority class, same delivery destination device (email vs. pager,etc.), are grouped into units of work, called jobs. The salient pointabout a job is that the reminders in one job can be scheduled as oneentity. Every minute the service assesses the amount of availabledelivery capacity, and starts delivery of new jobs from the head of thequeue until the queue is empty or delivery capacity is exhausted. Duringthe next minute some currently-running jobs complete (freeing updelivery capacity) and other new jobs are added into the queue. Theservice then repeats the process of selecting new jobs to be started.

The main task of the dynamic delivery algorithm is to ensure thatreminders are not delivered too late. The scheduling algorithm alreadyensures that reminders are not delivered too early by not adding thereminders to the delivery candidate queue until their delivery windowhas opened. The secondary task of the dynamic delivery algorithm is toensure that the queue is as short as possible at all times, whileensuring that reminders whose delivery window has just opened, i.e. theyhave just become candidates for delivery, remain on time.

Jobs in the queue are prioritized by their delivery urgency, defined asfollows:

-   -   Jobs that are not yet late are always preferred over jobs that        are late;    -   For jobs that are not late, the closer to late they are, the        more urgent they become;    -   For jobs that are already late, the less late they are, the more        urgent they become;    -   In the event of a tie, prefer the job with the smallest delivery        window, i.e. the smaller lead time.

This algorithm has several distinct advantages. Jobs which have lessaccurate delivery requirements are delivered earlier, offloading thesystem during peak times. Under heavy system load, less urgent jobs maypile up in the delivery queue; they are delivered as soon as loaddiminishes. Even during heavy load the algorithm attempts to keep newjobs on time. As soon as load diminishes, the algorithm attempts toclear the backlog as quickly as possible. The length of the queue at anygiven time is a good barometer of the overall health of the system.

Compiling a histogram of the queue length over a period of time gives agood indication of capacity requirements, volume spikes etc. Thealgorithm has one less-than-ideal property—under light and normal loads,it favors delivering reminders as early as possible, i.e. as soon as thedelivery window opens, rather than as close as possible to the requestedtime. This is an inevitable trade-off: the harder you try to avoid beingearly, the less safety margin you have and the more you risk being lateif anything goes wrong. The preferred bias in the reminders service isto try and confine the risk of late delivery to major hardware orsoftware failures.

The invention also comprises a mechanism for splitting the workloadusing controller-workers and monitoring their progress. This applies toa service, such as a reminders service, which is required to execute alarge workload at a specific time that exceeds the delivery capacity ofa single machine, and finish the workload within a small period of time.Mechanisms are provided whereby a process, known as a controller startsa unit of work, known as a job, as a new process, called a worker, on adifferent machine, i.e. the worker machine. The mechanism allows thesystem to distribute the work evenly, across all of the worker machines,taking into account their capacity and current load.

The controller divides a large job into smaller jobs by grouping therecords within the large jobs by a distribution ID, which in thepreferred embodiment is a number between 0 to 127 that is randomlyassigned to the record upon its creation, and by assigning a range ofdistribution IDs to a job.

The mechanism also allows the system to add new worker machines on thefly, and the controller starts assigning new work on the new machine tomeet heavy loads. On the other hand, should a worker machine fail orneed to be taken down, then the mechanism allows the system to removethe worker machine on the fly, and the controller does not start any newwork on that machine.

The worker starts executing the job that is sorted by the distributionID and keeps on updating the controller at a regular interval with itsprogress, measured in terms of the distribution ID. If the worker failsto complete the Job, then the controller has a way of identifying thefailure and restarting a new job that only does work that was notcompleted by the previous worker, thereby reducing the redundant work.

To safeguard against any single point of failure, the mechanism allowsrunning of a backup controller which monitors the primary controller andtakes charge when the primary is not able to do its job.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a block schematic diagram that details the workflow fromenqueueing single/multiple events into a reminders service to deliveryof the reminder to the end user according to the invention;

FIG. 2 is a block schematic diagram that shows the features of areminder system according to the invention;

FIG. 3 is a graph which shows jobs in a queue that are prioritized bytheir delivery urgency;

FIG. 4 is a screen display showing a reminders user interface dialogaccording to the invention;

FIG. 5 is a block diagram that shows the major components that getinserted into a template according to the invention;

FIG. 6 is a block diagram that shows a mapping of user appointments tounique reminder templates and custom templates according to theinvention;

FIG. 7 shows a display that provides a resulting reminder according tothe invention;

FIG. 8 shows a display that provides an example reminder sent viaInstant Message according to the invention;

FIG. 9 shows a display that provides an example reminder sent to the AIMclient as a Calendar Alert according to the invention;

FIG. 10 is a block schematic diagram that details the workflow fromsingle/multiple event importation into the calendar to delivery of thereminder via the service according to the invention;

FIG. 11 is a block diagram that shows a system overview according to theinvention;

FIG. 12 is a block diagram that shows a queuing subsystem according tothe invention;

FIG. 13 is a block diagram that shows a dequeuing subsystem according tothe invention; and

FIG. 14 is a block schematic diagram showing system deployment accordingto the invention.

DETAILED DESCRIPTION OF THE INVENTION

FIG. 1 is a block schematic diagram that details the workflow fromenqueueing single/multiple events into a reminders service to deliveryof the reminder to the end user according to the invention; FIG. 2 is ablock schematic diagram that shows the features of an enterprise-wideCalendaring system that includes a reminder system according to theinvention. The system 10 comprises various enterprise applications, suchas Click-To-Add 11, My Calendar 12, and Jot-It-Down 13. The server sideportion of the invention is provided in a reminders backend 20 thatincludes both a reminders service 21 and a mechanism for the creationand application of reminder templates 22. The reminders backend outputsreminder messages 23.

The presently preferred embodiment of the invention provides anelectronic calendar that comprises such features as recurring reminders,dividing unpredictable work loads into equal pieces, template freeparsing, a reminders scheduling algorithm to reduce spikes, dynamicdelivery and recovery algorithms, methods for splitting the work loadbetween controllers and workers and for monitoring progress, all withinthe context of a calendar architecture for a large enterprise.

The following features are implemented by the invention in connectionwith the exemplary embodiment, discussed below:

Optimized Recurring Reminders Database Queries

Two standard methods of handling recurring reminders are:

-   -   1. Expand the recurrence and store the reminders as single        occurrence reminders; and    -   2. Read all recurring reminders and see which ones occur during        a particular time span.

Method 1 has at least two major drawbacks:

-   -   Any changes require large amounts of database activity; and    -   How far into the future to expand the recurrence is unknown.

Method 2 has at least one major drawback:

-   -   Reading every recurring reminder is a very database intensive        task.

This aspect of the invention provides a third method of handlingrecurring reminders.

3. Store a probability hint with each recurring reminder.

The hint is used to optimize the number of recurring reminders that mustbe accessed to find all reminders to be sent during a time period. Thehint, in conjunction with the time period, greatly reduces the number offalse hits against the database.

The hint heuristic is specific to each recurrence type (weekly, monthly,etc.). During the queuing process each recurring reminder has a hintattached. Because the hint is only a hint the dequeuing process muststill determine if the reminder should be sent.

A Method for Dividing an Unpredictable Workload into Equal Pieces

This aspect of the invention applies to a service, such as a remindersservice, where clients can request actions to be taken in specific timeframes, where nothing is known in advance about the details of suchactions. Mechanisms are provided whereby clients may specify thesedetails, such as user ID and time of reminder, when requesting anaction, but it is not known whether (for example) some user IDs appearmuch more frequently than others.

When the entire workload of such a service is large enough to requirethe use of several devices working in parallel, it is important todivide up the actions that must be taken during a given time frame intogroups of equal size, so that each group can be assigned to one deviceand the number of actions to be taken by such device is no greater thansuch device can take within such time frame. But the details specifiedby the clients do not furnish the basis for any such equal division.This division is achieved by attaching to the description of each actiona label, additional to all details specified by the client anindependent therefrom, at the time when the request for action isreceived from the client, in such a fashion that all possible labelsappear with equal frequency. Actions to be taken in a given time framecan then be grouped according the labels attached to them, and it isassured that these groups are of equal size.

A Mechanism for Splitting the Workload Using Controller-Workers andMonitoring the Progress

This aspect of the invention applies to a service, such as the remindersservice disclosed herein, which is required to execute a large workloadat a specific time and finish it within a small period of time.Mechanisms are provided whereby a process, known as a controller startsa unit of work, known as a job, as a new process, called a worker, on adifferent machine, i.e. a worker machine.

The mechanism allows the system to distribute the work evenly across allthe worker machines depending upon their capacity and current usage. Thecontroller divides a large job into smaller jobs by grouping the recordswithin the large jobs by a distribution ID, i.e. a number between 0 to127 that is randomly assigned to the record upon its creation, andassigning a range of distribution IDs to a job.

The mechanism also allows the system to add a new worker machine on thefly, where the controller starts assigning new work on the new machine,to meet heavy loads. On the other hand, should a worker machine fail orneed to be taken down, then the mechanism allows the system to removethe worker machine on the fly, and the controller does not start any newwork on that machine.

The worker starts executing the job that is sorted by the distributionID and keeps on updating the controller at a regular interval with itsprogress, measured in terms of the distribution ID. If the worker failsto complete the job, then the controller has a way of identifying thefailure and restarting a new job that only does the work that was notcompleted by the previous worker, thereby reducing the redundant work.

To safeguard against any single point of failure, the mechanism allowsthe system to run a backup controller which keeps an eye on the primarycontroller and takes charge when the primary is not able to do its job.

Reminders Template Pre-Parsing

The reminders service delivers messages that are composed of two parts,i.e. reminder templates that contain standard content such as brandingand message formatting, and event-specific content such as the title ofthe event, the user's notes about the event, etc. Delivering a reminderinvolves merging these parts together to form the final remindercontent. To meet performance goals, the reminders service must minimizethe amount of per-reminder work it performs, and must perform as much ofthe work as possible local to the machine, i.e. with few or no networkor database interaction on a per-reminder basis.

One of the key performance optimizations provided by the inventionoccurs in the way standard reminder content is handled. All standardcontent for reminders is stored in a set of template files. The templatefile specifies the standard content for the reminder, and includes a setof directives indicating where the substitution of event-specificcontent should occur.

At runtime, template files are loaded into a cache in a lazy fashion,i.e. when they are first needed. The service has been designed such thatalthough many processes are involved to parallelize the delivery ofreminders, each delivery or worker process performs a set of work thatrequires only a small subset of the available templates.

When the template is first loaded into memory, it is pre-parsed, or‘freeze-dried’. This involves dissecting the template into an array ofhard coded string constants and variable names. The process ofassembling the final reminder content is then reduced to walking thefreeze-dried array once. String constants are appended to the finalmessage content, and template variable names are used as a lookup intothe dictionary of key-value pairs for this particular reminder.

This approach radically reduces the amount of CPU time required toassemble the final message content.

Reminders Scheduling Algorithm to Reduce Spikes in Delivery Volume

The inherent difficulty in delivering reminders to millions of users isthat the distribution of the reminder delivery times is extremelyuneven, e.g. meetings, social activity, events of all types generallystart on the hour or on the half-hour, and few users set reminders for8:07 am. This is exacerbated by the fact that users are generally mostactive during a subset of each 24 hour period—business hours onMonday-Friday, for instance, or (worse yet) “lunchtime”, e.g. 11-2 pm.

The user base is distributed across several time zones, and this doeshelp to scatter the traffic somewhat, but with only a three hour spreadacross the U.S. the improvement is marginal—9 am Monday morning PST isNoon EST—both extremely busy times for the reminders service. Thiscreates hotspots in the delivery schedule, times where the number ofreminders to be delivered momentarily exceeds the throughput of thesystem. To ensure robust and predictable reminder delivery, thereminders service must spread the load of reminder delivery across time,yet not deliver reminders too late or too early.

The reminders service weighs several factors in deciding when toschedule a reminder for delivery. Fundamental to the approach are twothings:

-   -   The intent of the user; and    -   The destination device.

The intent of the user is inferred by examining the lead time of thereminder. Lead time is defined as the difference between the time anevent occurs and the time for which the reminder for that event occurs.For instance, an event at 9:00 am with a reminder at 8:45 am has a leadtime of 15 minutes; an event on September 12th with a reminder onSeptember 5th has a lead time of one week. One key assumption made bythe reminders service is that the shorter the lead time for thereminder, the less accuracy is required in its delivery. To illustratewith the examples above, the reminder with a lead time of 15 minutes haslikely been set by a user to remind themselves to take immediate actionupon receipt of the reminder—to attend the 9:00 am meeting, forinstance. By contrast, a reminder with the lead time of one weeksuggests that the user must take some action in the near term (preparefor a meeting that is one week away, for instance), but the deliveryaccuracy of reminder with the one week lead time is much less critical.Delivering the 15-minute lead time reminder an hour early is bad—theuser set the reminder up with the assumption that they would be remindedof the event just as they needed to act upon it—and delivering it lateis extremely bad—the user just missed their meeting. For the one weeklead time reminder, though, delivering the reminder an hour isacceptable—the general intent of the user to receive a reminder about aweek before the event.

This approach is implemented in the reminders service by assigning eachreminder to a priority class based on the lead time of the reminder.Reminders with a lead time of less than one hour all fall into onepriority class, for instance, and reminders with a lead time of over oneweek fall into another. There are four priority classes in all.

Each priority class has a delivery window during which the reminders ofthat class may be delivered. The size of the window varies according tothe urgency of the priority class, and it is measured backwards from theideal delivery time. The delivery window for reminders with a lead timeof less than one hour is ten minutes, which can be read as follows: Fora reminder with an ideal delivery time of 8:45 am that has a lead timeof 15 minutes, i.e. it is a reminder for an event at 9 am, theacceptable delivery window is from 8:35 am-8:45 am. The delivery windowis much larger for reminders with long lead times—for a reminder with anideal delivery time of 9:00 am September 5 that has a lead time of oneweek, the acceptable delivery window is from 6:00 am-9:00 am September5th.

Clustering reminders into different priority classes allows the serviceto smooth the spikes in reminder delivery radically. During a peak timesuch as 9:00 am PST the majority of reminders for 9:00 am are deliveredin the hours previous—with extremely long lead time reminders beingdelivered several hours earlier. The short lead time reminders are stilldelivered close to 9:00 am because the user intent with short lead timesis to be reminded in an accurate manner close to the actual event time.

This delivery algorithm is further complicated by the notion that notall delivery destinations are ideal for less accurate delivery. Theservice supports delivery to email and cellular telephone destinations.If a user creates an email reminder with a one week lead time for 6:00am Monday morning, it is quite acceptable to deliver the email reminderto the user's mailbox at 3:00 am. This is completely untrue for cellulartelephone reminders—messaging to a cellular telephone at 3:00 am islikely to be unwanted by the user. For this reason the size of thedelivery window is drawn from a matrix of priority class and lead time.Reminders to email destinations are delivered much less accurately astheir lead time increases, while delivery to pagers and cellulartelephones maintains a short delivery window even for long lead timereminders, since the nature of the device requires more accuratedelivery.

Reminders Dynamic Delivery/Recovery Algorithm

Once a reminder has been scheduled using the algorithm described above,it is a candidate for delivery. The term candidate is used to indicatethat the actual delivery may not start as soon as the reminder has beenscheduled. Instead, a dynamic prioritization scheme is used to determinewhich reminders to deliver. It is assumed that at certain times thenumber of reminders to be delivered exceeds the delivery capacity of thesystem. This may occur at peak system usage times as discussed above,and may also occur after a scheduled or unscheduled system outage, whenthere is a large backlog of undelivered reminders that must beprocessed.

At these times the system must elect to deliver some reminders whileothers are forced to wait until capacity becomes available. This isaccomplished with a dynamic priority queue. As mentioned above,reminders with similar delivery properties—same priority class, samedelivery destination device (email vs. pager etc.)—are grouped intounits of work, called jobs. The salient point about a job is that thereminders in one job can be scheduled as one entity.

Every minute the service assesses the amount of available deliverycapacity, and starts delivery of new jobs from the head of the queueuntil the queue is empty or delivery capacity is exhausted. During thenext minute some currently running jobs complete (freeing up deliverycapacity) and other new jobs are added into the queue. The service thenrepeats the process of selecting new jobs to be started.

The task of the dynamic delivery algorithm is to ensure that remindersare not delivered too late. The scheduling algorithm already ensuresthat reminders are not delivered early by not adding the reminders tothe delivery queue until their delivery window has opened. The secondarytask of the dynamic delivery algorithm is to ensure that the queue is asshort as possible at all times, while ensuring that reminders whosedelivery window has just opened, i.e. they have just become candidatesfor delivery, remain on time. Jobs in the queue are prioritized by theirdelivery urgency, defined as shown in FIG. 3.

-   -   Jobs that are not yet late are always preferred over jobs that        are late.    -   For jobs that are not late, the closer to late they are, the        more urgent.    -   For jobs that are already late, the less late a job is, the more        urgent.    -   In the event of a tie, prefer the job with the smallest delivery        window, i.e. the smaller lead time.

This algorithm has several distinct advantages:

-   -   Jobs which have less accurate delivery requirements are        delivered earlier, offloading the system during peak times.    -   Under heavy system load, less urgent jobs may pile up in the        delivery queue; they are delivered as soon as load diminishes.        Even during heavy load the controller attempts to keep new jobs        on time.    -   As soon as load diminishes the system attempts to clear the        backlog as quickly as possible.    -   The length of the queue at any given time is a good barometer of        the overall health of the system. Compiling a histogram of the        queue length over a period of time should give a good indication        of capacity requirements, volume spikes etc.

The algorithm has one less-than-ideal property, i.e. under light andnormal loads, it tends to deliver reminders as early as possible, i.e.as soon as the delivery window opens, rather than as close as possibleto the requested time. This is an inevitable trade-off: the harder onetries to avoid being early, the less safety margin there is and the morethere is a risk of being late if anything goes wrong. The preferred biasin the reminders service is to try and confine the risk of late deliveryto major hardware or software failures.

Description of an Exemplary Embodiment

In the presently preferred embodiment of the invention, as implementedin the AOL service, reminders are messages sent to users that notifythem of upcoming calendar appointments (“events”). Users can choose howfar in advance (for example, up to four weeks) reminders are sent, aswell as the medium by which they are sent, e.g. email, pager, phone, orinstant message.

Without reminders, users are prone to forget birthdays and other eventsin their calendars that are recurring or set well in advance. Thus,reminders complete the organization cycle. In the AOL service, MyCalendar (see FIG. 2) is a hub for information gathering; reminders pushthis information back to the user. Most users check their email whenthey go online and benefit greatly by receiving event reminders viaemail. In fact, reminders are the most requested My Calendarenhancement.

Also, reminders represent a major programming opportunity for channelsand their partners. The reminder backend is based on a template systemthat enables per event type reminder programming. This allows a user toreceive, e.g. a birthday reminder that includes links to helpful giftsuggestions that AOL shopping inserted into the birthday remindertemplate.

Example

Your Mom's Birthday is in 2 weeks

Need a birthday gift idea?

Try Shop@AOL.

Users:

1) Users with friends and relatives who exchanges phone calls, cards, orgifts. A reminder via email several days in advance does not let themforget the event, and provides gift ideas.

2) Users with relatively few appointments. Such users are not heavilyhabituated to use calendars or day-timers. Reminders allow appointmentsto come to them, rather than users having to constantly check theircalendar.

3) Users with many appointments. Reminders provide a huge measure ofvalue by not letting users forget important events and lets them relymore on the calendar.

4) Mobile users with pagers or cellular telephones. Relatively few usersare at their computer all day. Reminders, especially those sent tomobile devices such as pagers and cellular telephones, allow the user totake his calendar with him.

Reminders in My Calendar

FIG. 4 is a screen display showing a reminders user interface dialogaccording to the invention. When a user creates or modifies anappointment, they access the appointment details dialog. From thisdialog, users can choose to set a reminder. There are many possiblecombinations of delivery addresses and lead times for a reminder. Theservice allows the user to specify their default values for theseproperties, so that setting a reminder is as simple as checking “yes” or“no” with the default address and lead times pre-selected.

Table 1 shows the features that My Calendar provides for managingreminders:

TABLE 1 My Calendar Features Feature Description Turn Reminder on/offLet users quickly enable a Reminder. Set Lead Time 4, 3, 2, 1 weeks; 4,3, 2, 1 days; 12, 6, 3, 2, 1 hours; 30, 15 minutes. Lead times up tofour weeks support gift events and vacation planning. Short lead timessupport paging and critical usage. Set Delivery Method AOL email/genericemail, IM, SMS pager or cellular telephone. users must be able to sendReminders to themselves at multiple locations where they may not haveCalendar access Set Event Type Reminder Templates are keyed by EventType: Birthday, Doctor's Appointment, etc. Shopping requires additionalbirthday granu- larity: Man, Woman, Teen, Child Store Preferences Usersneed to create and modify delivery addresses, and to be able to specifytheir default delivery locations and lead times.

Screen Name Validation

To discourage unscrupulous usage of My Calendar and reminders, users(AOL and AIM) are required to validate their screen name's default emailaddress before they can send email. Reminders leverage the existing MyCalendar mechanism for Tell A Friend to do so. This mechanism requiresusers to reply to an email sent to the default email address.

Reminder Error Handling

Table 2 below shows reminder error handling:

TABLE 2 Reminder Error Handling Modification of a If a user modifies ordeletes a Reminder delivery Delivery Address address that has pendingReminders, an alert must be set: “You still may have Reminders going tothis address, are you sure you want to delete it?” “You should changethese Reminders if you do” Setting Reminders Disallowed. Alert user. onPast Events Setting Reminders Disallowed. Alert user: “You have chosento with Insufficient receive a Reminder with an invalid lead time, LeadTime please select another” Setting Reminders Users can use the Calendarclient offline. If they when Offline set a Reminder, alert them to goonline or it is not set until they sync (which could result in LeadTime/ Past Event errors)

Reminders Service Backend

The reminder service backend (see FIG. 2) is designed to be flexible,scalable, and open to future integration with other services. It has noa priori knowledge of products. It is only concerned the scheduleddelivery of content to end users via several delivery mechanisms.

The major components of the backend are:

-   -   Reminder Service;    -   Reminder Templates;    -   Reminder Template Management UI;    -   Diagnostic UI;    -   Reporting; and    -   Meeting Performance Benchmarks.

Reminders Service

The purpose of the reminders service is to accept and store user, event,and reminder data from My Calendar. This data must capture all relevantMy Calendar appointment information, including events that occur atregular intervals, e.g. weekly, monthly, every second Sunday of themonth. “Notes,” and “More Info.”

At regular intervals, the service gathers reminders that are due, mergesthe user data with standard formatting information and sponsorshipprogramming, and delivers the reminder to users.

The reminders service must account for the various types of email andmessage formats device platforms support and ensure proper formatting.For instance, an email reminder must translate equally well across AOLService mail v5.0/6.0 as well as SMTP.

Table 3 below summarizes the reminders service:

TABLE 3 Reminders Service Feature Description User Data Service, i.e.Calendar, and Brand ID User data: user name, title, address, event dateand time, lead time, recurrence type, Notes, More Info Event ID: EventType and/or Template ID General Service Reminders can be added,modified, and deleted by Properties My Calendar Reminders can be listedper user Reminders are delivered using Hermes (AIM) Template SelectionService, Co-Brand and Event Type (Template ID) are the keys thatdetermine which Template is used per Reminder Lead Times 4, 3, 2, 1weeks; 4, 3, 2, 1 days; 12, 6, 3, 2, 1 hours; 30, 15 minutes. AddressingOptions Sent to AOL email and generic (SMTP) email address These areShould Have delivery addresses: Sent via IM (m2m & AIM alerts) SMS phoneand pager email addresses (truncated to time & title) Error HandlingReminder Service checks for errors (in conjunction with My Calendar)including: lead time, past event.

Reminder Templates

Reminder templates provide the flexible base of the reminder servicebackend. They enable the packaging of reminder user data from MyCalendar into various formats for delivery (email, IM, etc.) as well asto insert programming based on event type. Without a template system,each instance of a reminder per user would have to be storedinefficiently as an entire email.

Table 4 below summarizes reminder templates:

TABLE 4 Reminder Templates Feature Description Format Templateinformation can be stored as HTML/text. Delivery type determines finalformatting. Components User Data Design (event type theme, brand look)Sponsorship Programming Overall Size The average size of Template (intotal) needs to be kept low to ensure high throughput. Average = 5KStorage The system should be significantly scalable; with a minimumstorage of 10,000 Templates

FIG. 5 is a block diagram that shows the major components that getinserted into a template. Note that only email templates have design andprogramming.

Reminder Template Types My Calendar and All Others (Custom)

My Calendar (see FIG. 6) supports ˜40 event types for appointments whichmap to unique reminder templates. These are hard coded and cannot bechanged. All other templates are custom. These are created by channelswho map a custom reminder template to a custom CTA event (discussedbelow).

Brand Templates

Reminders support different brands. All My Calendar event type templatesare populated across each brand. Custom events may or may not (dependingupon the sponsor) be duplicated across each brand. Each brand can createunique messaging and sponsorships for their event types. Sponsorshipsprogramming can also be used across brands. Current brands are: AOL,CompuServe, and Netscape.com.

International Templates

There are templates that support different languages.

Default Directory Templates

In addition to the brand templates, there is a set of My Calendartemplates in a default directory. When the reminder service cannot finda specified template within a brand directory, it looks here for itbefore using an error template.

Error Templates

If a reminder is set that has not matching template anywhere in thereminder service, this template is used in the reminder. It does notpresent any error notices because, to the user none has occurred, andresembles a generic appointment template.

Template Management UI

Reminder templates must be able to be updated frequently. An HTML UI isavailable to business owners and channels to edit and deploy remindertemplates independently of a full software release cycle. This allowsthe reminder templates to be continually tuned to best meet AOL'sbusiness goals. It is conceivable that there are thousands of templatesto update on a daily basis.

Reminder templates are altered by logging in to an HTML interface thatallows their creation, modification, and deletion. AOL business ownersassign reminder templates to the appropriate AOL channel. The channelproducers can then manage the sponsorship content and formatting oftheir reminder templates. Guidelines are used to prevent size violationsand the management system is robust enough to allow multiple templatesto be updated at once by a producer.

Table 5 below summarizes the template management UI:

TABLE 5 Template Management UI Feature Description Access Internal URLvia simple log in Template Selection List By Event Type (name), Channel,and/or Brand Channel Production Create, Modify, & Delete Template (s)Input new body text & links Business Owner Assign Template Event Typesto Channels Create, Modify, & Delete Template (s) Input new body text &links Input Promo text QA Preview Template Test Links View Style Guide(publishing rules)

Example Email Reminder

Table 6 below shows reminder user data from My Calendar for a birthdayto be sent in email:

TABLE 6 Reminder User Data Service/Brand MyCalendar/AOL User JohnMcSmithAddress Email: johnmcsmith1@aol.com Lead Time 1 week Event Date06/02/2000 5:00 PM PST Recurrence Yearly Subject Little Sammy's BirthdayNotes Remember to get Hot Wheels. More Info <none present> Template IDBirthday_Child

Table 7 below shows stored programming content for the Template“Birthday_child:”

TABLE 7 Stores Programming Content Template ID Birthday_Child ChannelContent Need a Gift? Shop @ AOL's Quick Gifts delivers within 48 hours!Make sure you check out Red Envelope . . . Business Content You can alsosend a FREE personalized Birthday wish up to the last minute throughAmerican Greetings Shop!

FIG. 7 is a display that shows the resulting reminder.

Example IM and AIM (AOL Instant Messaging) Reminders

FIGS. 8 and 9 show displays that provide an example reminder sent viaInstant Message, as well as a reminder sent to the AIM client as aCalendar Alert. Note that event information is truncated (no channel isallowed).

Table 8 below shows the reminder user data:

TABLE 8 Reminder User Data Service/Brand MyCalendar/AOL User JohnMcSmithAddress Screen name: johnmcsmith Lead Time 30 minutes Event Date07/18/2000 7:35 PM PST Recurrence None Event Type Sports <ignored>Subject White Sox vs. Oakland A's Notes Check TV guide <ignored> MoreInfo N/A

Diagnostics UI

The reminder service backend requires monitoring of its vitalfunctionality to ensure reliability. A simple HTML UI allows systemadministrators a snapshot of system health, and allows them to tune andreconfigure aspects of the system on the fly. Measurements providedthrough the UI include total uptime, error handling, serviceperformance, and system performance.

Reporting UI

Metrics must be easily monitored for the reminders service. Businessowners need easy access to per event volume as well as error trackingsuch as event template matching failures (where a Channel's CTA event'sreminder does not get sent out). This UI is a “dash board” for generalmetrics, but also outputs reports for detailed reporting.

CTA (Click to Add) and Reminder Integration

Reminders are a major opportunity for business and channels. Thecombination of CTA and reminders allows a user to see an event ofinterest, click on it, and receive a reminder about it when the event isnear. Channels can program links in these reminders specific to the CTAevent. Because CTA can be placed only web site, this means thatvirtually anything can have a reminder: store sales, holidays, pregnancyplanners, home maintenance, etc.

Method

Channels create the CTA that includes a key name for the remindertemplate using the CTA tool or scripts. The channel then creates a newreminder template in the reminder management UI with the same key nameand inputs the programming.

Example

Shopping lets users set up holiday and custom events reminders fromtheir AOL Gift Service domain. Shopping creates a series of holidaysusing CTA with reminder template keys in place. Users select theseevents, e.g. holiday: Chanukah, and the data are passed to My Calendarwith the reminder. My Calendar forwards the template key to the reminderservice along with other reminder user data parameters. Partners can usethe reminder template management UI, to create a reminder template thatmaps to this key (holiday: Chanukah). When the reminder is sent to theuser, it contains information appropriate to the event, e.g. Chanukahgift ideas.

Template Keys in the Calendar UI

The reminder template keys are based on My Calendar event type plus aunique ID. Because there are more event types and reminder templatespossible than supported in the calendar UI, not all imported CTA eventtypes are completely displayable (although My Calendar stores and passesthem to the reminder service). For instance, if the imported event isholiday: Chanukah, only holiday is supported in the calendar UI. But,the entire key “holiday: Chanukah” is used in the reminder service tokey the appropriate template. In My Calendar, users see Chanukah as thetitle of the event. This is more beneficial because the title is visibleusers at the month/day level, where the event type is not (there is alsoa Holiday icon).

CTA—Reminders Cycle

FIG. 10 is a block schematic diagram that details the workflow fromsingle/multiple event importation into the calendar to delivery of thereminder via the service. The user 30 adds the event while browsing, mayor may not access the calendar, but receives reminders for the eventsthey have imported. Links in the reminder take users to partner sites 31where they can gather more events and/or take advantage of e-commerceopportunities. A key point in the process is the integration between theCTA tool 32 and reminder publishing tools. Partners 33 must be able topublish information that arrives at the correct reminder template easilyfor the event type they are creating for the calendar.

System Design System Overview

One primary role of the reminders service 21 (see FIGS. 1, 2, and 10) isto queue and dequeue reminders. As such the service is composed of twoindependent subsystems (see FIG. 11) that access a common set ofdatabase servers. The database farm 40 provides the shared queue for thetwo subsystems, and stores auxiliary information such as remindertemplates, commerce content, and delivery status information.

Queuing Subsystem

The queuing subsystem (210; FIG. 1) exposes an interface 41 to allowclient applications to store reminders, delete stored reminders, andperform simple query operations on the status of previously queuedreminders. It also exposes interfaces that allow monitoring of thesystem, and a publishing interface to allow third-party contentproviders access to the stored reminder templates and commerce content.

Dequeuing Subsystem

The dequeuing subsystem interfaces with external delivery mechanisms 43to perform the delivery of reminders. This subsystem periodicallyqueries the database servers for reminders that are to be delivered overa time slice or quantum. It retrieves the reminders from the database,merges the reminder content for each reminder with a predefined templatefile, and then delivers the reminder through the appropriate deliverymechanism. It also tracks the status of delivery of batches of remindersand stores this information back into the database.

Queuing Subsystem Overview

The queuing subsystem 20 (see FIGS. 1 and 12) provides a set ofhigh-level interfaces to client applications. The central remindersinterface 51 is designed to be as portable and client-agnostic aspossible, using a stateless XML-based request/response protocol known asStandard Object Access Protocol (SOAP) for client-neutral methodinvocation over HTTP.

The monitoring interface 52 is designed to be accessed by AOL operationsstaff. Through this interface the operations staff can check the statusof any machine or process, examine error output, and perform queries andconfiguration of the service on the fly. A set of HTML pages provide theinterface.

The content interface 53 is accessed by third-party production staff,allowing them to examine existing templates and commerce content, editthis content, and add new content. A set of HTML pages comprise thisinterface.

This subsystem is composed of a set of servlets running within aNetscape Enterprise Server. Each component provides specific code toservice its requests and call into a common set of objects that providecommon data representations and encapsulate tasks such as databaseaccess.

The queuing components are deployed across two or more physical machinesto provide robustness. The servers exist in the AOL secure network andaccept connections only from a list of trusted IP addresses.

Queuing Reminders

A client application invokes the queue method on the reminders interface(refer to the interface descriptions later in this document for thespecific syntax). Reminders are created by merging a set of key-valuepairs with an existing parameterized template. Thus, with the queueinvocation the client must pass either the name of the template that isto be used to create the reminders, or must pass demographic data thatallows the template to be inferred by the reminders service. The contentinterface to the service allows production staff to store templates intothe service, and also to associate templates with demographicinformation. The demographic information is an integer range or a set ofenumerated types associated with a data item—age between 25 and 35, orinterest in sports for instance. This information is a set ofenumerations that support gender, age, interest categories, and pricerange. The client must also provide the set of key-value pairs that areused to populate the selected template at delivery time.

The client may queue single-instance and recurring reminders through theinterface. For single-instance reminders the client provides the desireddelivery date/time. Recurring reminders require the client to specifythe start and end date of the recurrence, the time of the reminder, andthe desired recurrence pattern. The queueing process attaches a hint toeach recurring reminder. The hint is based on the recurrence type of theevent according to Table 9 below:

TABLE 9 Recurrence Type of Event If number is 28, true value is 28 or 29Type Value Description Daily 0 NO HINT Weekly bit map The exact day ofthe week 1 = Sunday on which a reminder must 1 = Monday be sent. etc.Monthly number The exact days of the week By Day 0 = Sunday on which areminder must 1 = Monday be sent. etc. Monthly number Earliest day ofmonth on By Date day of month which reminder might be sent. Within 3days of true value. If number is 8, true value is between 8 and 11. Ifnumber is 30, true value is between 30 and 2. Yearly number Earlistmonth/day on which month * 256 + Day the reminder might be sent. Within1 day of true value. If number is 4, true value is 4 or 5. If number is28, true value is 28 or 29.

Finally the client passes a 32-bit number that it uses to identifyuniquely the reminder should it wish in the future to check the status,modify, or delete an existing reminder. Within the reminders servicethese UIDs are unique only when combined with a client applicationidentifier, allowing different client applications to use the samescheme for UIDs without collisions.

The queuing components then select the appropriate database into whichto store the reminder (see database hashing, below), and write one rowinto the single-occurrence or recurring reminder table as appropriate.It then returns a structured SOAP response to the client applicationindicating the success or failure of the operation.

Dequeuing Subsystem Overview

The dequeuing subsystem 60 (see FIG. 13) is responsible for retrievingreminders from the database store 40, merging the reminder informationwith the correct template, and then delivering the reminder through theappropriate delivery mechanism. This subsystem is designed to be spreadacross as many machines as necessary to achieve the required throughput.The subsystem is comprised of two major server components, i.e.controllers 61 and work processes 62. A controller/worker architectureis chosen in this instance to allow the work processes to be distributedacross many processes and physical machines without involving a complexpeer-to-peer recovery system.

FIG. 14 is a block schematic diagram showing system deployment accordingto the invention. The architecture allows the load to be evenlydistributed and minimizes data loss in the event of system failure.

One controller is associated with each logical database instance. Alogical database instance contains several separate physical databasesthat are linked using native database replication. The controller spawnsworker processes locally or remotely, then monitors the progress of eachworker process, restarting the processes as necessary, and/or notifyingthe operations staff of system failure. A service periodically monitorsthe controller processes, and restarts them as necessary.

When a worker process is started, the controller provides it allinformation it needs to process a task from a given database. The workerestablishes a connection to the database, reads out the reminders thatit must process, merges them with the appropriate templates, and usesthe necessary delivery mechanism(s) to deliver the reminders. Once ithas completed delivery of its batch of reminders, it updates thedatabase to indicate the completion status.

Both the controllers and workers are dedicated server processesimplemented in Java (can also be implemented in C). They communicateusing basic sockets functionality. The controller processes hold openconnections to each of their spawned worker processes while thoseprocesses are alive, to ensure the health of the worker process, and tobe able to query the worker processes for status information.

Controller Process Lifecycle

Upon process startup, the controller process uses a command-lineargument or environment variable to connect to the central store for allconfiguration information (this may be an RDBMS or an LDAP store).

The controller reads all configuration information from this store,determining which reminders database it is dedicated to, how to connectto that database, which servers are available to start worker processeson, how many processes the controller may start etc.

The controller uses the system time to determine the start of the nexttime quantum. One time quantum comprises five minutes, as this is thefinal target granularity of the service. Other time quantums may bechosen as appropriate. The controller then sleeps until the beginning ofthe next time quantum, e.g. if the controller is started at 8:57 am, itsleeps until 9:00 am.

When the controller wakes, it begins to prepare the delivery ofnotifications with a target delivery quantum of current quantum plusone. For instance, at 9:00 am, the controller starts to prepare for thedelivery of reminders with a target delivery time between 9:05 and 9:10am. It counts the number of reminders to be delivered in the timequantum, and estimates the number of work processes that are needed todeliver the reminders.

The controller adds a new entry for the worker processes in the taskstable in its database, marking these new tasks as scheduled, and notingwhich subset of reminders for the quantum is allocated to each workerprocess.

The worker processes are then started by the controller process, startedon a round robin bases across the available work servers. The controllerpasses all necessary information to the worker process to enable it toprocess the reminders: database connection information, target timequantum, the range of reminders that each worker is to deliver.

The controller holds open socket/RMI connections to each of the activeworker processes. The controller then sleeps, waking every minute untilthe start of the next time quantum to check the status of the workerprocesses. Every minute it ensures that all worker processes are stillalive and that it can receive acknowledgement from each worker throughthe open network connection.

If one or more of the worker processes has failed, the controllerattempts to restart the process on another machine, and/or notifiesoperations staff that there has been an unexpected failure. If theworkers are still processing, or all workers have completed their tasks,the controller simply sleeps until the next minute and eventually untilthe start of the next time quantum, at which point it starts thedelivery cycle again.

Once per day, according to configuration information about the lowestusage time on the service, the controller also spawns a new cleanupworker process. This is a dedicated process that bulk deletes deliverednotifications from the reminders database. Deferring this deletion untiloff-peak hours ensures that no database writes are needed on aper-reminder basis to process a set of reminders.

Worker Process Lifecycle

Once the worker process has been started, it establishes a connectionback to its owning controller process. It receives all necessaryinformation from the controller process to deliver a batch of reminders.

The worker opens a connection to the specified database, and updates theentry in the tasks table to have the status started. It also opensconnections to the delivery servers that it uses to fulfill delivery ofthe reminders.

The worker loads templates and commerce content from the database orfrom local files. It then selects the rows from the database, using thehint on recurring reminder that it needs to deliver. The database queryfor dequeuing recurring reminders is based on the hint, not the actualdata of the event. The records returned from the query are guaranteed tobe a superset of the reminders that need to be sent. The recordsreturned by the query are then filtered by applying the true recurrencepattern to the current date to reduce the set to that which must besent.

For each reminder the worker merges the reminder-specific data with thespecified template. It then attempts to deliver the reminder.

If the worker cannot communicate with the needed delivery server, itretries the connection N times, then processes all reminders that useother delivery mechanisms. It updates the task entry in the task tableto failed.

Assuming reminder delivery completes successfully, the task table entryis updated as complete. This allows the queuing interface to answerqueries about the delivery status of a specific reminder—it consults thetask table and infers success or failure from the overall success orfailure of the task.

Finally the worker notifies the controller that is has completed, andexits.

Database Hashing

The database hashing scheme uses n number (for example, 32) logicaldatabases, which references m (say, 16) physical databases. This meansthey can be actual databases, or they can be mapped onto the samephysical database.

A database versioning scheme is used on the basis that it does nothappen very often that operations adds new databases, and ideally thiscould be done without having to migrate or rebalance data betweendatabases. The versioning adds a version identifier to each storedreminder as part of its synthetic UID, which acts as a lookup into theversion table to determine which physical database and table to examineto find the reminder. The database lookup map is read from a centralstore at service startup time.

Schema

Single Instance Reminder:

-   -   Event Id;    -   User Id;    -   Brand Id;    -   Service Id;    -   Delivery Day;    -   Delivery Time;    -   Lead Time;    -   Delivery Type;    -   Delivery Address;    -   Template Parameters; and    -   Distribution Id.

Recurring Reminder:

-   -   Event Id    -   User Id    -   Brand Id    -   Service Id    -   Start Day    -   End Day    -   Delivery Time    -   Lead Time    -   Recurrence Type    -   Occurs On    -   Hint    -   Hint2    -   Frequency    -   Timezone    -   DST Used    -   DST Active    -   UTC Offset    -   Delivery Type    -   Delivery Address    -   Template Parameters    -   Distribution Id

Active Job Table:

-   -   Controller Id;    -   Sequential Id;    -   DB Index;    -   Cluster Index;    -   Quantum;    -   Delivery Type;    -   Query Type;    -   Urgency;    -   Scheduled Start;    -   Actual Start;    -   Actual End;    -   Status;    -   Worker Host;    -   Worker Name;    -   Abort Reason;    -   When Updated;    -   Query Completion;    -   Query In Progress;    -   Distribution Id Min;    -   Distribution Id Max;    -   Progress;    -   Created Time; and    -   Schedule Count.

Completed Job Table:

-   -   Controller Id;    -   Sequential Id;    -   DB Index;    -   Cluster Index;    -   Quantum;    -   Delivery Type;    -   Query Type;    -   Urgency;    -   Scheduled Start;    -   Actual Start;    -   Actual End;    -   Status    -   Worker Host;    -   Worker Name;    -   Abort Reason;    -   When Updated;    -   Query Completion;    -   Query In Progress;    -   Distribution Id Min;    -   Distribution Id Max; and    -   Progress.

Job Queue Table

-   -   Controller Id;    -   Sequential Id;    -   Delivery Type;    -   Query Type;    -   Distribution Id Min;    -   Distribution Id Max;    -   Queue Id;    -   Urgency;    -   Deadline;    -   Est Size; and    -   Created Time.

Recovery Job Table

-   -   Controller Id;    -   Sequential Id;    -   DB Index;    -   Cluster Index;    -   From Time;    -   To Time; and    -   Progress.

Controller Table

-   -   Controller Id;    -   Controller Port;    -   Controller Host; and    -   Type.

Template Table

-   -   Service Id;    -   Brand Id;    -   Template Name;    -   Modify Time; and    -   Template.

User/Client Feature Requirements Calendar Reminders

The present minimum granularity targets for delivery of reminders iswithin one day. However, the entire design and implementation strategyis focused around building a system capable of achieving a granularityof five minutes, i.e. if a reminder has been set for 9:00 am, the targetdelivery window is from 8:55 am-9:00 am.

The reminders service supports the full range of recurrence patternssupported by the calendar service. Because the calendar provides a richset of these recurrence patterns, the reminders service does not supportany additional patterns.

Valid recurrence types are:

-   -   Daily    -   Weekly    -   Monthly    -   Yearly    -   Day of Week (any or all of M/T/W/T/F/S/S)

These types can also use the modality of n^(th) occurrence (“daily everyother month”, “M-F” every fourth week”). Also supported for “day ofweek” (Mon-Sun) are patterns of the modality:

-   -   First;    -   Second;    -   Third;    -   Fourth; and    -   Last.

Users can schedule reminders through the calendar service UI. Thesereminders are stored by the reminders service, and users maysubsequently change or cancel existing reminders. If a user edits areminder that is within ten minutes of being delivered, their changesare not guaranteed to be reflected in the reminder. Through the calendarsettings interface users may create default reminder preferences such asdestination address and default delivery time(s) (“30 minutes beforeappointment”), to allow them to add reminders to their appointmentsquickly on creation. Users can also set their preferred deliverymechanisms (email/AIM/pager etc.) through this interface.

Users may also be allowed to address certain reminders to a list ofattendees or interested parties. Special care must be taken to ensurethat features designed for scheduled notification do not create securityholes—allowing users to spam other users with email or pager messages byusing the reminders service.

Batched Daily Calendar Reminders

Users of calendar receive daily notifications containing a summary oftheir day's appointments. Batched reminders are delivered early enoughto arrive in a user's inbox or early in their day, allowing anat-a-glance look at their day. The days batched reminder for a givenuser can be enqueued up to four hours before desired delivery. Thismeans that changes to the user's calendar within this time window arenot reflected in the batched reminder. The delivery of the batchedreminder is expected to be accurate to within one hour, the calendarsettings UI allowing the user to determine when that should be (9 am, 6pm) etc.

This feature is mainly a function of the calendar service, and not thereminders service. It is the goal of the reminders service to expose anAPI that is equally useful to all clients, and that is agnostic aboutthe specificities of any client. Developing the batched reminder featureinvolves periodically scanning the calendar database tables andenqueueing the day's reminder for each user in the reminders service.Because this task requires low-level knowledge of, and access to, thecalendar database schema, it is logical to bundle this as calendarservice functionality.

The reminders service is designed to accommodate the requirements of thebatched reminders feature (quantity of text etc.), but the periodicscanning of the calendar databases and enqueuing of reminders for usersis regarded as a calendar feature.

Reminders may be batched together using the following algorithm:

If multiple reminders are scheduled that have the same delivery time,refer to the same destination user, use the same reminder template, andare designated as ‘hatchable’ (this parameter is part of the remindersservice queuing API), they are combined into one reminder.

A batched reminder uses the header portion of the reminder template,then populates the body portion of the template as many times as thereare reminders to be combined. Finally, the footer is appended and thereminder is delivered.

Standalone Reminders Service UI

This aspect of the invention presents an end-user interface to replace,for example, the existing AOL reminder service. The existing serviceprovides only extremely coarse-grained delivery via email. Users maycreate email reminders which are delivered 14 days from the event, andoptionally also four days before the event. Events may optionally recurwith simple annual recurrence, and reminders are delivered at nospecific time of day. Standard public holidays and occasion reminders,e.g. for Valentine's Day, are pre-created, or user may elect their ownspecific date for birthdays, anniversaries etc. A very small set ofdemographic information is also collected with each reminder(male/female, child/teen/adult) to provide targeted e-commerce linkswith the reminder.

The standalone reminder service UI is designed as a superset of thefunctionality that currently exists in the AOL reminder service. The UIis provided through an HTML UI, rather than the current FDO forms-basedinterface.

Reminders Service Client API

This aspect of the invention exposes a lightweight HTTP-based API toallow, for example, other AOL services the ability to post remindersinto the reminders service. This API allows the enqueueing ofsingle-occurrence and recurring notifications, and the modification anddeletion of existing notifications. The client is also able to query thestatus of existing reminders.

The client API is a simple sessionless request/response-based API. Noknowledge of client state is maintained between requests. Clients whowish to enqueue a reminder with the service make an HTTP connection, andPOST a block of formatted text, e.g. a block of XML conforming to apublished DTD. In this XML, the client passes pertinent data to thereminder service indicating delivery time and mechanism(s), cobrand andlanguage requirements, demographic information (if any), and custom userdata for inclusion in the reminder.

The service synchronously queues the reminder and returns a similarstructured-text block indicating the result of the operation, and, onsuccess, returns a stringified unique identifier that the client may usein later conversation with the reminders service to retrieve informationabout, modify, or delete an existing reminder.

Exposing an API at this high level allows for a simple yet richconversation between the service and its clients, while making noassumptions about the client development language, deployment platformetc. Security of access to this API should be considered, although itshould be pointed out this approach differs little from a standard HTTPPOST to any web server exposed to the Internet at large.

Client Content Requirements Content

Reminders are created from a set of reminder templates stored by theservice. A template has a header, a body, and a footer. Templatestypically store generic content that does not vary on a per-notificationlevel—stock layout HTML for email, or stock image URLs to be includedwith every notification for a given cobrand. Data that vary per-reminderare passed to the reminders service as a set of key-value parametersthat are substituted into the template at delivery time.

Templates are specific to a client and a cobrand for that client—forinstance, “Calendar—AOL cobrand” uses different templates than the“Calendar—Compuserve cobrand”. Templates also vary by deliverymechanism—shorter, text based templates may be used for pager delivery,while longer, HTML-based templates may be used for email. It is alsoconceivable that each set of templates would need to vary bylanguage—English, Japanese etc. The reminders service does not limit thevariety of templates that may be stored for a given client.

It is important to identify the desired template when enqueueing anotification, but a client may store an arbitrary number of templates tosupport the variety of user features it requires.

Templates are identified in one of two ways:

The client application may specify a template by name, and thecorresponding template is then populated to generate the reminder; or

More interestingly, the client application may pass a set of enumerateddemographic data (gender/age range/interest/price) that allow theservice to infer which template to use based on cobrand-specific lookuptables that have been added to the service through the publishinginterface (below).

Publishing Requirements

One aspect of the invention exposes a lightweight HTML-based interfaceto allow reminders clients to publish templates and demographic lookuptables into the reminder service. A set of simple HTML screens allowproduction staff to add, review and edit commerce and content datastored for their brand. This allows content to be updated on the flywithout requiring a release cycle. Changes to the content should beorganized and validated, but providing a high-level API shouldfacilitate easy integration between client brands/products/service andthe reminders service.

Operations Requirements System Alerts

The reminders service must detect fatal system errors and alertoperations staff as soon as possible.

Alerts should have the following properties:

-   -   Alert Generation—Alerts are to be used only for fatal system        errors that require human intervention. Care must be taken to        avoid spurious alert generation. It is acceptable to generate        multiple alerts for the same fatal error until the error is        remedied, however the number of alerts generated must be        carefully controlled—it is not acceptable to generate tens or        hundreds of alerts per minutes for the same fatal error;    -   Alert content—For the system alerts to be useful, they must        contain as much specific error content as possible. All alerts        should contain the following information: the name and IP        address of the machine on which the alert is being generated,        the name and IP address of the remote machine that could not be        contacted (in case of network-related failures), the system        component and/or class that is generating the alert, a detailed        description of the error, all pertinent contextual information,        and a list of suggestions for troubleshooting the situation.    -   SMTP Alert Delivery—Alerts must be delivered via email to a        configurable address. Each system component must be capable of        generating email alerts independently, with no reliance on other        service components to perform the task.    -   Syslog Logging—To integrate with existing system monitoring        facilities, alerts must be written to the operating system's log        file (syslog) in addition to being delivered in email. The alert        content is identical to that provided in the email alert.    -   System Self-Monitoring—To ensure the reliable functioning of the        system, constant system self-testing is required. While the        alert facility described above helps ensure a rapid response to        fatal system errors, self-monitoring provides a barometer of        overall system health, and helps diagnose bottlenecks within,        and external to, the system. Periodic self-monitoring is        accomplished with two discrete subsystems—one observes the        queuing functionality of the reminders service, the other        monitors reminder delivery from the database through to the        actual mailbox delivery.    -   Queue Monitoring—The queuing components run as servlets within a        set of web servers, servicing HTTP POST requests to store, edit,        and delete reminders. The processes are monitored as with other        web services, by means of periodic HTTP requests to a special        test servlet on each of the web server machines. The        infrastructure to support this kind of monitoring is well        understood and common to many web services.    -   Very little implementation is required for the reminders service        to participate—it is necessary only to implement the test        servlet, document the semantics of calling the servlet, and        ensure that it is installed on all web server machines that        provide queuing facilities. Operations staff then configure the        existing monitoring services to periodically call the test        servlet on each web server.    -   Delivery Monitoring—The goal of all error-reporting and        monitoring tools is to enable operations staff to pinpoint the        precise location of the error rapidly. For the delivery of        reminders this situation is complicated by the fact that failure        to deliver can occur not only within the service but also        external to the service, in the delivery mechanism itself.        Although it is not practical to test every delivery path fully        (SMTP email reminders, for instance, are relayed through many        machines on the Internet at large), an awareness of the overall        behavior of the delivery mechanism is critical to pinpointing        problems with the system. Ideally, a bottleneck in mail servers        is distinguishable from a problem within the reminders service.        For this reason, the delivery monitoring facilities extend        through to the endpoint of the delivery mechanism, to where the        reminder reaches the user.        Additionally, within the reminders service itself there are also        several parallel delivery systems, each one servicing a portion        of the overall system load, i.e. one database cluster. To ensure        complete monitoring of the service, each of these paths through        the system must be observed, originating at the database and        terminating at the point that the end user receives the        reminder.    -   Test Reminders—The reminders service seeds each database cluster        with one recurring reminder that is to be delivered every N        minutes, where N is a configurable system value. This reminder        is written into the database as part of the initial database        setup script. The test reminder is retrieved from the database        and delivered exactly as a normal reminder by the regular worker        process.

The test reminder uses a dedicated test template to generate thereminder content. Within the template are special keys names thatindicate to the worker process that it must embed system performanceinformation in the reminder body.

The worker embeds the following information in each test reminder itdelivers: the originating database cluster ID, the scheduled deliverydate/GMT time for the reminder, the actual date/GMT time at which thereminder was passed to the delivery mechanism, the actual date/GMT timethe worker process was started, and the number of reminders processed sofar by the worker.

Test reminders are then delivered to the named address as with allreminders. The SMTP server that receives mail for the test destinationaddress is hosted and must be visible to the reminders queuing webservers. It is acceptable to deliver the test mail to an existing mailserver, however because the volume of mail is significant it may besimpler to provide a dedicated low-power machine as part of thereminders installation itself that runs the SMTP server receiving alltest mail.

A process on the SMTP server is started periodically to harvest the testmails from the test mailbox. This process retrieves each mail. Itcollates information for each database cluster, detailing whetherreminders were received for each quantum. Additionally it examines thearrival timestamp for each mail message, recording the delta between thetime at which the reminder was handed to the delivery mechanism and thetime it actually arrived in the mailbox.

Once all new mail has been examined, a summary file is written. Thesummary file(s) should be current to within ten minutes, i.e. theharvesting script should be run at least that often. The processed mailis then deleted from the SMTP server. The information written to thesummary file must be visible from the reminders service subnet becauseit is integrated into the status/troubleshooting UI, as described below.

System Status UI

The system status UI provides an at-a-glance overview of the entirereminders service, and also provides administrative facilities forsystem maintenance. Its main purpose is to help operations staff respondto system alerts, allowing them to understand the scope of the problemquickly.

The status UI is comprised of a set of web pages served by Javaservlets. Hosting the servlets on the queuing web servers is acceptablefrom a security standpoint because none of these machines areaddressable from the Internet at large. Because the status UI allowspotentially harmful actions to be taken (deleting of a user's reminders,for example), access must be tightly controlled. No authentication oraccess control is provided by the tool itself; the web server's built-incontrol lists are used to limit access by login/password or originatingIP address. It may also be necessary to allow different levels of accessfor each page/servlet in the UI; this functionality is also provided bythe web server.

The Status UI is comprised of the following components:

-   -   System Overview Page—The system overview page provides basic        information about the status of each machine/process        participating in the reminders service. Each time the page is        loaded it displays a snapshot of the current state of the        system, including the time at which the snapshot was taken. A        refresh button allows the snapshot to be updated by the user.        When the snapshot is taken, the servlet retrieves information on        all system components as follows:        -   Queuing servers—An HTTP request is made to the test servlet            on each web server machine. The UI shows the hostname, IP            address, and port number of each process, and an icon and            clearly-visible color-coding to show any failed ping            attempts.        -   Database servers—The test servlet attempts to establish a            connection to each database instance, and performs a no-op            query or stored procedure execution. The UI displays the            hostname, IP address, and database name or ID for each            database instance. As above, the success or failure of the            ping attempt is clearly visible and color coded for easy            reading.        -   Controllers—Each controller is contacted, and queried as to            its lifespan (how long that controller has been running),            which master/slave it is attached to, and for the list of            currently running worker processes that the controller has.            The UI then displays the hostname, IP address, and port for            each running controller, its lifespan, the total number of            active workers the controller is monitoring, and the length            of the queue table (the controller has this information in            memory). If a controller could not be contacted the failure            is clearly indicated as described above.        -   In addition, the UI displays each worker machine, with a            list of how many worker processes are active on that machine            (this information is supplied by the controllers), and which            workers belong to which controllers.

Add/Remove Worker Servers Page

This page is accessed from a button on the system overview page. Itdisplays the list of work servers that are currently marked as availablefor the scheduling of new work. From this page the administrator can adda new worker machine by entering the hostname or IP address of themachine. The servlet attempts to contact the new work server and spawn anew process, as a sanity check to ensure that the designated machine hasthe correct software already installed. Assuming that this check issuccessful (and the machine is not a duplicate of one already in thelist), each controller is contacted by the servlet and told to updateits map of available servers with the new server. Once this action iscomplete worker process should immediately start to be scheduled on thenew machine.

-   -   The administrator may also remove worker machines from service.        In this case each controller is advised by the test servlet that        the indicated machine may no longer be used to schedule new        work. Existing work continues to run to completion on machines        that are removed from the active list. Once all existing work        processes have finished the administrator is free to take that        worker machine offline.        -   Delete Reminders/User Page—Malicious use of the reminders            Service cannot be entirely prevented, so it is critical that            operations and/or customer care staff are able to disable            user accounts quickly. This page allows the user to retrieve            a count of reminders for a given screenname, a list of            reminders for a screenname, and (most importantly) the            ability to delete all reminders for a screenname.        -   Delivery Statistics Page—The delivery information that is            collected by the mail harvesting process is displayed to the            administrator on this page. It displays a histogram of the            last 24 hours showing when mail was successfully received            for each of the database clusters, and an average of the            delivery latency (the time difference between handing the            reminder to the delivery mechanism and its arrival into the            mailbox. Depending on how much information is available, the            administrator is able to page back through delivery            statistics for previous days.

External Client API

Interface Protocol

The client interface is a simple, stateless HTTP request/responseinteraction. Clients POST an XML text block to the server, whichresponds with an XML text block indicating success, return values, errorconditions, etc. This interface is based on the proposed Simple ObjectAccess Protocol, aka SOAP.

Method invocation involves passing a SOAP body element with one childelement that is the name of the method to be invoked. Within the methodelements are a set of parameters matching the method prototype. Theserver then responds with a similarly structured tree of XML, returningthe overall result of the method call in the first child element of themethod name, which must be names “return.” Any parameters that aredesignated as “out” parameters in the method prototype are also returnedin the server response.

If the method invocation fails, the server returns a SOAP faultstructure as the result of the call. This is conceptually similar to anexception being thrown by the method.

Below are examples of successful and failed method calls through SOAP:

Sample Method Invocation:

<SOAP-ENV:Envelope> <SOAP-ENV:Body> <m:CreateReminder><ReminderUId>98830678</ReminderUId> <ServiceId>12</ServiceId><CobrandId>12</CobrandId> <UserId>2848</UserId> <BatchId>199</BatchId><TemplateParams>template=Appointment_sluser=Joe|Title=Sam'sBirthday</TemplateParams> <Day>22</Day> <Month>7</Month><Year>2000</Year> <UTm>09:00</UTm> <LeadTime>30</LeadTime> <RecurInfo><EndDate> <Day>14</Day> <Month>6</Month> <Year>2001 </Year> </EndDate><RecurType>2</RecurType> <Frequency>5</Frequency> <OccursOn>5</OccursOn><TimeZone>8</TimeZone> <DstUsed>1</DstUsed> <DstActive>0</DstActive><UtcOffsetDays>−1<UtcOffsetDays> <Exceptions> 155|200 </Exceptions></RecurInfo> <Address>rupesh©aolscape.com</Address><DeliveryType>2</DeliveryType> </m:CreateReminder> </SOAP-ENV:Body></SOAP-ENV:Envelope>

Sample Successful Response (Returning UID of Stored Reminder):

HTTP/1.1 200 OK Server: Netscape-Enterprise/4.1 Date: Sat, 22 Jul 200001:32:49 GMT Content-type: text/xml; charset=IS08859_1 Content-length:182 <SOAP-ENV:Envelope> <SOAP-ENV:Body> <m:CreateReminderResponse> <OK>Success!Successfully created a Reminder! </OK></m:CreateReminderResponse> </SOAP-ENV:Body> </SOAP-ENV:Envelope>

Sample Unsuccessful Response:

HTTP/1 .1 500 Server Error Server: Netscape-Enterprise/4.1 Date: Sat, 22Jul 2000 01:43:28 GMT Content-type: text/xml; charset=IS08859_1Content-length: 315 <SOAP-ENV:Envelope> <SOAP-ENV:Body> <SOAP-ENV:Fault><faultcode>Client</faultcode> <faultstring>Invalid appdata</faultstring> <detail> <message>Lead time not long enough</message><errorcode>2013</errorcode> <exception>Base exception</exception></detail> </SOAP-ENV:Fault> </SOAP-ENV:Body> </SOAP-ENV:Envelope>

Reminders API

Recurrence Information

Enumerations:

   enum eRecurType {    None,    Daily,    Weekly,    MonthlyByDay,   MonthlyByDate,    Yearly    }    enum eDayOfMonth {    FirstMon,FirstTue, FirstWed, FirstThu, FirstFri, FirstSat, FirstSun,   SecondMon,  SecondTue,  SecondWed,  SecondThu, SecondFri,  SecondSat,SecondSun,    ThirdMon, ThirdTue, ThirdWed, ThirdThu, ThirdFri,ThirdSat,    ThirdSun,    FourthMon, FourthTue, FourthWed, FourthThu,FourthFri,    FourthSat, FourthSun,    LastMon, LastTue, LastWed,LastThu, LastFri, LastSat, LastSun    }    enum eDayOfWeek {    Sunday =1,    Monday = 2,    Tuesday = 4,    Wednesday = 8,    Thursday = 16,   Friday = 32,    Saturday = 64    }

Compound Data Types:

<GMTTime>  <Hour> integer  <Minute> integer </GMTTime> <Date>  <Day>integer  <Month> integer  <Year> integer </Date> <RecurInfo> <StartDate> Date  <RecurType> eRecurType  <EndDate> Date <WeeklyOccursOn> integer  <MonthlyByDayOccursOn> eDay0fMonth <MonthlyByDateOccursOn> integer  <Frequency> integer  <Exceptions>ArrayOfDate </RecurInfo>

The RecurInfo structure allows the client application to specifyrecurrence patterns. There are two mandatory parameters, and severaloptional parameters. Minimally the client must pass the StartDate andRecurType. If the RecurType is “Weekly” the client must also supply aninteger OR'd set of days in the “WeeklyOccursOn” parameter. If theRecurType is “MonthlyByDate” the client must pass the“MonthlyByDateOccursOn” parameter indicating the integer day of themonth. If the RecurType is “MonthlyByDay” the client must pass the“MonthlyByDayOccursOn” parameter with one of the enumerated eDayOfMonthvalues.

enum eDayOfWeek {  Sunday = 1,  Monday = 2,  Tuesday = 4,  Wednesday =8,  Thursday = 16,  Friday = 32,  Saturday = 64 }

Compound Data Types:

<GMTTime>  <Hour> integer  <Minute> integer </GMTTime> <Date>  <Day>integer  <Month> integer  <Year> integer </Date> <RecurInfo> <StartDate> Date  <RecurType> eRecurType  <EndDate> Date <WeeklyOccursOn> integer  <MonthlyByDayOccursOn> eDayOfMonth <MonthlyByDateOccursOn> integer  <Frequency> integer  <Exceptions>ArrayOfDate </RecurInfo>

The RecurInfo structure allows the client application to specifyrecurrence patterns. There are two mandatory parameters, and severaloptional parameters. Minimally the client must pass the StartDate andRecurType. If the RecurType is “Weekly” the client must also supply aninteger OR'd set of days in the “WeeklyOccursOn” parameter. If theRecurType is “MonthlyByDate” the client must pass the“MonthlyByDateOccursOn” parameter indicating the integer day of themonth. If the RecurType is “MonthlyByDay” the client must pass the“MonthlyByDayOccursOn” parameter with one of the enumerated eDayOfMonthvalues.

If no EndDate is passed, the recurrence pattern is assumed to berecurring with no end date. If no frequency is passed, the assumedfrequency is “every”. If no Exception array is passed, it is assumedthat there are no exceptions to the recurrence pattern.

Examples of RecurInfo Data Type:

Saturday and Sunday every second week, starting on the first of Februaryand ending at the end of March:

<Day>1 </Day> <Month>2</Month> <Year>2000</Year> <11rm>09:00</UTm><LeadTime>30</LeadTime><RecurInfo>  <EndDate>   <Day>31 </Day>  <Month>3</Month>   <Year>2000</Year>  </EndDate> <RecurType>2</RecurType> <Frequency>1 </Frequency><OccursOn>65</OccursOn> <TimeZone>8</TimeZone> <DstUsed>1</DstUsed><DstActive>0</DstActive> <UtcOffsetDays>−1<UtcOffsetDays> </RecurInfo>First Monday of every month during 2000, except during March:

<RecurInfo>  <StartDate>  <Day>1 </Day>  <Month>1 </Month> <Year>2000</Year>  </StartDate>  <EndDate>  <Day>31 </Day> <Month>12</Month>  <Year>2000</Year>  </EndDate> <RecurType>MonthlyByDay</RecurType>  <DayOfMonth>FirstMon</DayOfMonth> <Exceptions>  <Date>   <Day>6</Day>   <Month>3</Month>  <Year>2000</Year>   </Date>  </Exceptions> </RecurInfo>

Creating and Editing Reminders

The CreateReminder method allows the client application to store bothsingle occurrence and recurring reminders. The caller of the method mustpass either a ReminderDate for a one-time reminder, or a RecurInfostructure to indicate the recurrence pattern and duration of a recurringreminder.

The calling application must supply a unique integer identifier that ituses to identify the reminder subsequently. It is up to the caller toensure that the identifier is not duplicated. If a UID is passed thatconflicts with an existing reminder in the system this call will throw aDuplicateUIDException.

To specify a reminder template that is used to populate the reminderbody, the caller of this method must pass either the literalcase-insensitive template name string, e.g. “BirthdayReminder”, or mustpass the DemographicData string to allow the template to be inferred bythe Service.

 boolean CreateReminder(  [in] Date ReminderDate,  [in] RecurInfoRecurrence,  [in] GMTTime ReminderTime,  [in] integer ServiceID,  [in]integer ClientBrandID,  [in] integer ReminderUID,  [in] integer UserID, [in] string TemplateParameters,  [in] string Address ) throwsNoSuchTemplateException, MissingParameterException, InvalidParameterException, ParseException, TooLateException,DuplicateUIDException;

Changing an existing reminder involves a similar method call, with themajority of parameters functioning identically to the CreateRemindercall above. In this case however the UID that is passed to the ReminderService must already exist—if it does not exist the method call throws aNoSuchUIDException when the call is submitted.

If the desired behavior is to update the existing reminder or create anew reminder on the fly the client may pass the UpdateOrCreate flag, inwhich case the reminder will be dynamically created if it does notexist, rather than an exception being thrown.

The other method parameters follow the same conventions as theCreateReminder method.

boolean UpdateReminder(  [in] boolean UpdateOrCreate,  [in] DateReminderDate,  [in] RecurInfo Recurrence,  [in] GMTTime ReminderTime, [in] integer Service ID,  [in] integer ClientBrand ID,  [in] integerReminderU ID,  [in] integer UserId, [in] string TemplateParameters, [in] string Address ) throws  NoSuchUIDException, NoSuchTemplateException,  MissingParameterException, InvalidParameterException,  ParseException,  TooLateException;

Reminders may be removed from the system by calling the DeleteRemindermethod, passing the UID of the existing reminder. If the reminder UIDcannot be located, the method returns false but no exception is thrown.

boolean DeleteReminder(  [in] integer ReminderU ID,  [in] integerService ID,  [in] integer ClientBrand ID,  [in] integer UserId, ) throws MissingParameterException,  InvalidParameterException,  ParseException;

Querying on Reminders

enum eDeliveryStatus {  Waiting,  In Process,  Delivered,  Failed }eDeliveryStatus GetDeliveryStatus(  [in] integer ReminderUID, ) throws NoSuchUIDException,  MissingParameterException, InvalidParameterException,  ParseException; boolean ReminderExists( [in] integer ReminderU ID, ) throws  MissingParameterException, InvalidParameterException,  ParseException; boolean GetReminder(  [in]integer ReminderU ID,  [in] integer Service ID,  [in] integerClientBrand ID,  [in] integer UserId  [out] Date ReminderDate,  [out]RecurInfo Recurrence,  [out] GMTTime ReminderTime,  [out] integerService ID,  [out] integer ClientBrandID,  [out] integer ReminderUID, [out] string TemplateParameters,  [out] string Address ) throws MissingParameterException,  InvalidParameterException,  ParseException;

Although the invention is described herein with reference to thepreferred embodiment, one skilled in the art will readily appreciatethat other applications may be substituted for those set forth hereinwithout departing from the spirit and scope of the present invention.Accordingly, the invention should only be limited by the Claims includedbelow.

1.-23. (canceled)
 24. A method, comprising: receiving, from a user of anelectronic calendar service, an event identifier for a calendar eventpromoted by a third party; determining, using at least one processor, areminder template associated with the event identifier by the thirdparty; adding a reminder to an electronic calendar of the user inaccordance with the reminder template; generating, upon a determinationthat the reminder is due, a reminder notification that contains contentspecified by the third party; and sending the reminder notification tothe user.
 25. The method as recited in claim 24, wherein the contentspecified by the third party comprises one or more links that relate tothe calendar event, the method further comprising: receiving, from thethird party, the one or more links; and adding the one or more links tothe reminder notification.
 26. The method as recited in claim 25,wherein the one or more links comprise a link to a website controlled bythe third party.
 27. The method as recited in claim 24, furthercomprising: generating the event identifier for the calendar eventpromoted by the third party; generating the reminder template asspecified by the third party; and associating the event identifier withthe reminder template.
 28. The method as recited in claim 24, furthercomprising: receiving user data from the user of the electronic calendarservice; and adding at least a portion of the user data to the remindernotification.
 29. The method as recited in claim 24, further comprising:providing a reminder user interface to the user of the electroniccalendar service, wherein the reminder user interface displays one ormore details that relate to the reminder; receiving input from the userof the electronic calendar service, wherein the input specifies the oneor more details that relate to the reminder; and modifying the reminderin accordance with the input received from the user of the electroniccalendar service.
 30. The method as recited in claim 24, wherein theevent identifier is a template key.
 31. The method as recited in claim30, wherein the template key comprises an event type and a uniqueidentifier.
 32. The method as recited in claim 24, wherein the remindernotification is sent to the user via e-mail.
 33. The method as recitedin claim 24, wherein the reminder notification is sent to a mobiledevice associated with the user of the electronic calendar service. 34.The method as recited in claim 33, wherein the mobile device associatedwith the user of the electronic calendar service comprises a cellulartelephone.
 35. The method as recited in claim 24, wherein the eventidentifier is received in response to the user clicking on a link on awebsite.
 36. A system comprising: at least one processor; and at leastone non-transitory computer readable storage medium storing instructionsthereon that, when executed by the at least one processor, cause thesystem to: receive, from a user of an electronic calendar service, anevent identifier for a calendar event promoted by a third party;determine a reminder template associated with the event identifier bythe third party; add a reminder to an electronic calendar of the user inaccordance with the reminder template; generate, upon a determinationthat the reminder is due, a reminder notification that contains contentspecified by the third party; and send the reminder notification to theuser.
 37. The system as recited in claim 36, further comprisinginstructions that, when executed by the at least one processor, causethe system to: receive, from the third party, one or more links thatrelate to the calendar event; and add the one or more links to thereminder notification.
 38. The system as recited in claim 37, furthercomprising instructions that, when executed by the at least oneprocessor, cause the system to: receive user data from the user of theelectronic calendar service; and add at least a portion of the user datato the reminder notification.
 39. The system as recited in claim 36,further comprising instructions that, when executed by the at least oneprocessor, cause the system to modify the reminder in accordance withinput received from the user of the electronic calendar service.
 40. Thesystem as recited in claim 39, further comprising instructions that,when executed by the at least one processor, cause the system to:provide a reminder user interface to the user of the electronic calendarservice, wherein the reminder user interface displays one or moredetails that relate to the reminder; and receive input from the user ofthe electronic calendar service, wherein the input specifies the one ormore details relating to the reminder.
 41. The system as recited inclaim 36, further comprising instructions that, when executed by the atleast one processor, cause the system to: generate the event identifierfor the calendar event promoted by the third party; generate thereminder template as specified by the third party; and associate theevent identifier with the reminder template.
 42. A non-transitorycomputer readable storage medium storing instructions thereon that, whenexecuted by a processor, cause a computer system to: receive, from auser of an electronic calendar service, an event identifier for acalendar event promoted by a third party; determine a reminder templateassociated with the event identifier by the third party; add a reminderto an electronic calendar of the user in accordance with the remindertemplate; generate, upon a determination that the reminder is due, areminder notification that contains content specified by the thirdparty; and send the reminder notification to the user.
 43. The computerreadable storage medium as recited in claim 42, further comprisinginstructions that, when executed by the processor, cause the computersystem to: receive, from the third party, one or more links that relateto the calendar event; and add the one or more links to the remindernotification.
 44. The computer readable storage medium as recited inclaim 43, further comprising instructions that, when executed by theprocessor, cause the computer system to: receive user data from the userof the electronic calendar service; and add at least a portion of theuser data to the reminder notification.